#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
void Function(int n)
{
	int a=1, b=1, c;
	for (int i = 1; i <= n - 2; i++)
	{
		c = a + b;
		a = b;
		b = c;
	}
	printf("%d", c);
}
int main()
{
	int n;
	scanf("%d", &n);
	Function(n);
	return 0;
}